<section class="scrollable padder-md" data-ng-controller="DriverEditController">
    <div class="m-b-md">
        <a href="" class="btn btn-rounded  btn-sm btn-icon btn-default pull-right" data-ng-click="close()">
            <i class="fa fa-reply"></i>
        </a>
        <h3 class="m-b-none text-black">
            <i class="fa fa-edit m-r-sm"></i>
            司机管理- {{driver.nickname || '新增'}}
        </h3>
    </div>

    <section class="panel panel-default">
        <div class="panel-body">
            <form name="driverForm" class="form-horizontal">
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        头像:
                    </label>
                    <div class="col-md-8">
                        <div yg-file-upload data-file-ids="driver.avatar" data-is-img="true"
                             data-width="200" data-height="200" data-is-circle="true" data-file-length="1">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        注册手机：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.username" required/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        登录密码：
                    </label>
                    <div class="col-md-8">
                        <input type="password" class="form-control" data-ng-model="driver.password"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        昵称：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.nickname" required/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        联系电话：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.tel" required/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        邮箱：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.mail"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        描述：
                    </label>
                    <div class="col-md-8">
                        <textarea class="form-control" rows="5" data-ng-model="driver.description"></textarea>
                        <!--<input type="text" class="form-control" data-ng-model="passenger.description"/>-->
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        是否启用：
                    </label>
                    <div class="col-md-8">
                        <label class="switch pull-left m-r-sm">
                            <input type="checkbox" data-ng-model="driver.enable"
                                   data-ng-true-value="true" data-ng-false-value="false"
                                   data-ng-checked="driver.enable==true">
                            <span></span>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        能否创建订单：
                    </label>
                    <div class="col-md-8">
                        <label class="switch pull-left m-r-sm">
                            <input type="checkbox" data-ng-model="driver.createOrder"
                                   data-ng-true-value="true" data-ng-false-value="false"
                                   data-ng-checked="driver.createOrder==true">
                            <span></span>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        注册时间：
                    </label>
                    <div class="col-md-8">
                        {{driver.createTime | date:'yyyy-MM-dd HH:MM' || ""}}
                    </div>
                </div>
                <div style="clear:both"></div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        一寸彩色近照：
                    </label>
                    <div class="col-md-8">
                        <div yg-file-upload data-file-ids="driver.headImgUrl" data-is-img="true"
                             data-width="200" data-height="200" data-file-length="1"
                             data-ng-click="showPic(driver.headImgUrl)">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        姓名：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.identityName"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        身份证号：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.identityNo"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        身份证照片(正面)：
                    </label>
                    <div class="col-md-8">
                        <div yg-file-upload data-file-ids="driver.identityImgUrl1" data-is-img="true"
                             data-width="200" data-height="200" data-file-length="1"
                             data-ng-click="showPic(driver.identityImgUrl1)">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        身份证照片(反面)：
                    </label>
                    <div class="col-md-8">
                        <div yg-file-upload data-file-ids="driver.identityImgUrl2" data-is-img="true"
                             data-width="200" data-height="200" data-file-length="1"
                             data-ng-click="showPic(driver.identityImgUrl2)">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        驾驶证正本：
                    </label>
                    <div class="col-md-8">
                        <div yg-file-upload data-file-ids="driver.licenseImgUrl1" data-is-img="true"
                             data-width="200" data-height="200" data-file-length="1"
                             data-ng-click="showPic(driver.licenseImgUrl1)">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        驾驶证副本：
                    </label>
                    <div class="col-md-8">
                        <div yg-file-upload data-file-ids="driver.licenseImgUrl2" data-is-img="true"
                             data-width="200" data-height="200" data-file-length="1"
                             data-ng-click="showPic(driver.licenseImgUrl2)">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        出生日期：
                    </label>
                    <div class="col-md-8">
                        <input data-ng-model="driver.birthday" class="input-sm form-control" type="text"
                               data-jss-datetimepicker="yyyy-mm-dd hh:ii" placeholder="出生日期" pickerPosition="top-right"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        家庭住址：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.address"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        驾照类型：
                    </label>
                    <div class="col-md-8">
                        <select class="form-control" data-ng-model="driver.licenseType"
                                data-ng-options="type for type in licenseTypeList">
                            <option value="" disabled>--请选择--</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        驾照初领时间：
                    </label>
                    <div class="col-md-8">
                        <input data-ng-model="driver.licenseGetTime" class="input-sm form-control" type="text"
                               data-jss-datetimepicker="yyyy-mm-dd hh:ii" placeholder="驾照初领时间" pickerPosition="top-right"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        驾照有效期限：
                    </label>
                    <div class="col-md-8">
                        <input data-ng-model="driver.licenseEndTime" class="input-sm form-control" type="text"
                               data-jss-datetimepicker="yyyy-mm-dd hh:ii" placeholder="驾照有效期限" pickerPosition="top-right"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        紧急联系人：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.emergencyContacts"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        紧急联系人电话：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.emergencyContactsPhone"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        紧急联系人地址：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.emergencyContactsAddress"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        审核状态：
                    </label>
                    <div class="col-md-8">
                        <select class="form-control" data-ng-model="driver.authorized"
                                data-ng-options="a.value as a.name for a in authorizedList">
                            <option value="" disabled>--请选择--</option>
                        </select>
                    </div>
                </div>
                <div class="form-group" data-ng-if="driver.authorized == -1">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        理由：
                    </label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" data-ng-model="driver.reason"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        过期状态：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control" data-ng-if="driver.expireState == 0">正常</span>
                        <span class="form-control" data-ng-if="driver.expireState == 1">快过期</span>
                        <span class="form-control" data-ng-if="driver.expireState == 2">已过期</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span class="mustinput">*</span>
                        更新时间：
                    </label>
                    <div class="col-md-8">
                        <span class="form-control">{{driver.updateTime | date:'yyyy-MM-dd HH:mm:ss' || ""}}</span>
                    </div>
                </div>
                <!-- 按钮 -->
                <div class="form-group text-right" style="margin-left: 15px; margin-right: 15px;">
                    <button type="button" class="btn btn-default" data-ng-click="close()">
                        <i class="i i-arrow"></i>
                        &nbsp;返回
                    </button>
                    <button type="submit" class="btn btn-success" data-ng-click="saveObj()">
                        <i class="fa fa-save"></i>
                        &nbsp;保存
                    </button>
                </div>
            </form>
        </div>
    </section>
</section>

<script src="js/lib/md5/md5.js"></script>
